#import "wooddoc.h"

@implementation WoodDoc (SplitViewDelegate)

- splitView:sender getMinY:(NXCoord *)minY 
  maxY:(NXCoord *)maxY ofSubviewAt:(int)offset
{
    *minY = 100.0;      
    *maxY -= 100.0;     
    if ( *maxY < 100.0 ) 
		*maxY = 100.0;
    return self;
}

- splitView:sender resizeSubviews:(const NXSize *)oldSize
{
    NXRect lower, upper;
    float delta;
    
    [[sender window] disableDisplay];
    [sender adjustSubviews];    
    [scrollView getFrame:&upper];
    [textView getFrame:&lower];
    if(lower.size.height > 100){
        delta = 100.0 - lower.size.height;
        lower.size.height = 100;
        upper.size.height -= delta;
        [scrollView setFrame:&upper];
        [textView setFrame:&lower];
    }        
    [[sender window] reenableDisplay];
    [[sender window] display];
    return self;
}

@end
